#ifndef PM_MAINFRAME_H_INCLUDED
#define PM_MAINFRAME_H_INCLUDED

#include "mainframegui.h"
#include <wx/aui/aui.h>
#include <wx/choice.h>
#include <wx/docview.h> // for wxFileHistory

class PanelSumary;
class PanelCost;
class PanelWorkRequest;
class PanelTask;
class PanelIndicator;
class PanelTag;

class MainFrame : public MainFrameGui
{
	wxAuiManager m_aui;
	
	PanelSumary*      m_panelSumary;
	PanelCost*        m_panelCost;
	PanelWorkRequest* m_panelWorkRequest;
	PanelTask*        m_panelTask;
	PanelIndicator*   m_panelIndicator;
	PanelTag*         m_panelTag;
	
	wxFileHistory     m_fileHistory;
	
public:
	MainFrame( wxWindow *parent );
	virtual ~MainFrame();
	
	int GetActiveProject() const;
	
	void OpenFile(const wxString& filename);

protected:
	void OnProjectLoaded(wxCommandEvent& event);
	
	// event handlers from wxFB
	virtual void OnCloseFrame( wxCloseEvent& event );
	virtual void OnExitClick( wxCommandEvent& event );
	
	virtual void OnFileNew( wxCommandEvent& event );
	virtual void OnFileOpen( wxCommandEvent& event );
	virtual void OnFileMRU( wxCommandEvent& event );
	virtual void OnFileSave( wxCommandEvent& event );
	
	virtual void OnNewCost( wxCommandEvent& event );
	
	virtual void OnMenuViewSelection( wxCommandEvent& event );
	virtual void OnMenuViewUpdateUI( wxUpdateUIEvent& event );

	virtual void OnAbout( wxCommandEvent& event );
};

#endif // PM_MAINFRAME_H_INCLUDED
